<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="CommunityController.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script>
function ccc(a,b,c,d,e){
	location.href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_reple_form&id="+a+"&ref="+b+"&re_step="+c+"&re_level="+d+"&nick="+e;
	//location.href="/KOMORIUTA/community/FreeBoard/CM_Free_Rwrite.jsp&id="+rwrite.id.value+"&ref="+rwrite.ref.value+"&re_step="+rwrite.re_step.value+"&re_level="+rwrite.re_level.value;
}
</script>
</head>
<%
FreeBoardBean freeBoardBean=(FreeBoardBean)session.getAttribute("freeBoardBean");
String nick=(String)session.getAttribute("Mem_Nick");
%>
<body>

<table cellpadding="0" cellspacing="0" width="700" style="border: 1px solid #e6e6e6">
	<tr>
		<td width="10">&nbsp;</td>
		<td width="680" height="36" colspan="2"  style="border-bottom: 1px dashed #e6e6e6;"><table cellpadding="0" cellspacing="0" width="100%" ><tr><td valign="middle"><b><%= freeBoardBean.getTitle() %></b></td></tr></table></td>
		<td width="10">&nbsp;</td>
	</tr>
	<tr height="30" valign="middle">
		<td width="10">&nbsp;</td>
		<td><img src="/KOMORIUTA/photo/img/Cm_Free_Read_1.png" style="vertical-align: bottom;">	<%= freeBoardBean.getNick() %></td>
		<td align="right"><img src="/KOMORIUTA/photo/img/Cm_Free_Read_2.png" style="vertical-align: bottom;"><%= freeBoardBean.getB_date() %>
		<img src="/KOMORIUTA/photo/img/Cm_Free_Read_3.png" style="vertical-align: bottom;"><%=freeBoardBean.getViewcount() %>&nbsp;</td>
		<td width="10">&nbsp;</td>
	</tr>
	<tr><td colspan="4">&nbsp;</td></tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td colspan="2">
			<%= freeBoardBean.getContents() %>
		</td>
		<td width="10">&nbsp;</td>
	</tr>
	<tr><td colspan="4">&nbsp;</td></tr>	
</table>
<form action="/KOMORIUTA/community/FreeBoard/CM_Free_Rwrite.jsp" method="post" name="rwrite">
<input type="hidden" name="id" value="<%=freeBoardBean.getId() %>" />
<input type="hidden" name="ref" value="<%=freeBoardBean.getRef() %>" />
<input type="hidden" name="re_step" value="<%=freeBoardBean.getRe_step() %>" />
<input type="hidden" name="re_level" value="<%=freeBoardBean.getRe_level() %>" />
<input type="hidden" name="nick" value="<%=nick %>" />
<br/>
<table cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td>
		<%
			
			if(freeBoardBean.getNick().equals(nick) || nick.equals("admin")){
		%>
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_modify_form&id=<%=freeBoardBean.getId() %>&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/Cm_Free_Read_Modi.png"></a>
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_delete&ref=<%=freeBoardBean.getRef() %>&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/Cm_Free_Read_Dl.png"></a>
		<%
			} 
		%>
		
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_list&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/Cm_Free_Read_list.png"></a>
		<%
			
			if(freeBoardBean.getNick().equals(nick)){
			}else{
		%>
		<a href="#" onClick="ccc('<%=freeBoardBean.getId() %>','<%=freeBoardBean.getRef() %>','<%=freeBoardBean.getRe_step() %>','<%=freeBoardBean.getRe_level() %>','<%=nick %>')"><img src="/KOMORIUTA/photo/img/Cm_Free_Read_comment.png" border=0 /></a>
		<%
			}
		%>
		</td>
	</tr>
</table>
</form>





<!--  
<table border=1 cellpadding=0 cellspacing=0 bordercolor="#e8eef9" width="600">
	<tr height="30">
		<td bgcolor="#c9d9f7">タイトル</td>
		<td colspan="5"><%= freeBoardBean.getTitle() %></td>
	</tr>
	<tr height="30">
		<td bgcolor="#c9d9f7">ユーザー名</td>
		<td><%= freeBoardBean.getNick() %></td>
		<td bgcolor="#c9d9f7">日付</td>
		<td><%= freeBoardBean.getB_date() %></td>
		<td bgcolor="#c9d9f7">アクセス</td>
		<td><%=freeBoardBean.getViewcount() %></td>
	</tr>

	<tr height="300">
		<td colspan="6"><%= freeBoardBean.getContents() %></td>
	</tr>
</table>
<form action="/KOMORIUTA/community/FreeBoard/CM_Free_Rwrite.jsp" method="post" name="rwrite">
<input type="hidden" name="id" value="<%=freeBoardBean.getId() %>" />
<input type="hidden" name="ref" value="<%=freeBoardBean.getRef() %>" />
<input type="hidden" name="re_step" value="<%=freeBoardBean.getRe_step() %>" />
<input type="hidden" name="re_level" value="<%=freeBoardBean.getRe_level() %>" />
<input type="hidden" name="nick" value="<%=nick %>" />
<table>
	<tr>
		<td>
		<%
			
			if(freeBoardBean.getNick().equals(nick)){
		%>
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_modify_form&id=<%=freeBoardBean.getId() %>&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/syusei.jpg" border=0 /></a>
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_delete&ref=<%=freeBoardBean.getRef() %>&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/torikesi2.jpg" border=0 /></a>
		<%
			} 
		%>
		<a href="/KOMORIUTA/FreeBoardAction.do?action=cm_free_list&nick=<%=nick %>"><img src="/KOMORIUTA/photo/img/list.jpg" border=0 /></a>
		<%
			
			if(freeBoardBean.getNick().equals(nick)){
			}else{
		%>
		<a href="#" onClick="ccc('<%=freeBoardBean.getId() %>','<%=freeBoardBean.getRef() %>','<%=freeBoardBean.getRe_step() %>','<%=freeBoardBean.getRe_level() %>','<%=nick %>')"><img src="/KOMORIUTA/photo/img/comment.jpg" border=0 /></a>
		<%
			}
		%>
		</td>
	</tr>
</table>
</form>
-->
</body>
</html>